<?=isset($header) ? $header : ''?>
<form method="post" action="<?=site_url('/consignment/edit_submit')?>" id="userinfo" class="form_main">
<div class="main">
<ul style="width:960px;display:table;text-align:center; margin:0 auto">
				<li style="height: 30px;font-size:24px;color: #4DB800;text-align: center;font-weight:bold;"><?=$consignment_management->consignment_name."客户需求表"?></li>
</ul>
<div id="tabs" style="position:relative">			
			<ul style="background-color:#8EC43B;color:white;width:960px;display:table; margin:0 auto">
				<li><a href="#tabs-1">第一頁</a></li>
				<li><a href="#tabs-2">第二頁</a></li>
			</ul>
<div id="tabs-1" >
	<table width="960" cellspacing="0" cellpadding="0" border="0" style="margin:0 auto;">
		<tbody><tr height="20" style="background-color:#8EC43B;color:white;line-height:20px;">
			<td bgcolor="#8EC43B" style="border-left:none;border-right:none;border-bottom:none;border-top:none;" colspan="5"><b>&nbsp;&nbsp;I.客戶基本資料</b></td>
		</tr>
		<tr height="40">
			<td width="70" style="border-left:none;border-right:none;border-bottom:none;border-top:none;line-height:30px;">姓名 </td>
			<td width="80" style="border-left:none;border-right:none;border-bottom:none;border-top:none;line-height:30px;">
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:100px;"  id="name" name="name" value="<?=$consignment->name?>">
				<input type="checkbox" id="ms" name="ms" value="1" <? if(strstr($consignment->ms,'1')) echo "checked";?>>女士/<input type="checkbox" id="mr" name="mr" value="1" <? if(strstr($consignment->mr,'1')) echo "checked";?>>先生
			</td>
			<td width="200" style="border-top:none;line-height:30px;">手機&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:120px;" id="mobile" name="mobile" value="<?=$consignment->mobile?>">
			</td>
			<td  style="border-left:none;border-right:none;border-bottom:none;border-top:none;line-height:30px;">&nbsp;&nbsp;&nbsp;電話(O)&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:120px;" id="home_phone" name="home_phone" value="<?=$consignment->home_phone?>">&nbsp;&nbsp;&nbsp;(H)&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:120px;" id="company_phone" name="company_phone" value="<?=$consignment->company_phone?>">
			</td>		
		</tr>
		<tr height="40">
			<td>住家地址</td>
			<td >
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:280px;" id="home_address" name="home_address" value="<?=$consignment->home_address?>">
			</td>
			<td colspan="2">大樓名稱&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:320px;" id="building_name" name="building_name" value="<?=$consignment->building_name?>">
			</td>
		</tr>
		<tr height="40">
			<td>公司地址</td>
			<td >
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:280px;" id="company_address" name="company_address" value="<?=$consignment->company_address?>">
			</td>
			<td colspan="3">公司名稱&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:320px;" id="company_name" name="company_name" value="<?=$consignment->company_name?>">
			</td>
		</tr>
		<tr height="40">
			<td>Email</td>
			<td >
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:250px;" id="email" name="email" value="<?=$consignment->email?>">
			</td>
			<td colspan="2">介紹人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:120px;" id="contact" name="contact" value="<?=$consignment->contact?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;電話&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:120px;" id="contact_phone" name="contact_phone" value="<?=$consignment->contact_phone?>">
			</td>
		</tr>
		<tr height="20">
			<td bgcolor="#8EC43B"  style="background-color:#8EC43B;color:white;line-height:20px;" colspan="5"><b>&nbsp;&nbsp;II.客戶需求</b></td>
		</tr>
		<tr height="40">
			<td>需求面積</td>
			<td colspan="2">
				<input type="checkbox" id="demand_area" name="demand_area[]" value="1" <? if(strstr($consignment->demand_area,'/1/')) echo "checked";?> >110坪左右
				<input type="checkbox" id="demand_area" name="demand_area[]" value="2" <? if(strstr($consignment->demand_area,'/2/')) echo "checked";?> >150~200坪
				<input type="checkbox" id="demand_area" name="demand_area[]" value="3" <? if(strstr($consignment->demand_area,'/3/')) echo "checked";?> >250坪左右
				<input type="checkbox" id="demand_area" name="demand_area[]" value="4" <? if(strstr($consignment->demand_area,'/4/')) echo "checked";?> >300坪以上
			</td>
			<td rowspan="2">車位&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="parking_number" name="parking_number" value="<?=$consignment->parking_number?>">
				個  <br>
				<input type="checkbox" id="acceptable_mechanical" name="acceptable_mechanical" value="1" <? if($consignment->acceptable_mechanical=='1') echo "checked";?>>車位相連B <input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:30px;" id="b1" name="b1" value="<?=$consignment->b1?>">/<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:30px;" id="b2" name="b2" value="<?=$consignment->b2?>">/
			</td>
		</tr>
		<tr height="40">
			<td>室內面積</td>
			<td>
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:130px;" id="indoor_area" name="indoor_area" value="<?=$consignment->indoor_area?>">
				坪(不含陽台)
			</td>
			<td>其他需求&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:180px;" id="other_demand" name="other_demand" value="<?=$consignment->other_demand?>">
			</td>
		</tr>
		<tr height="40">	
			<td>需求樓層</td>	
			<td colspan="1">
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:180px;" id="floors" name="floors" value="<?=$consignment->floors?>">
			</td>	
			<td rowspan="2" colspan="3">
				<input type="checkbox" id="windows1" name="windows1" value="1" <? if($consignment->windows1=='1') echo "checked";?>>落地窗
				<input type="checkbox" id="building_facing1" name="building_facing1" value="1" <? if($consignment->building_facing1=='1') echo "checked";?>>本棟大樓
				<input type="checkbox" id="facing_the_household1" name="facing_the_household1" value="1" <? if($consignment->facing_the_household1=='1') echo "checked";?>>該戶大門
				座<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="seat1" name="seat1" value="<?=$consignment->seat1?>">
				朝<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="towards1" name="towards1" value="<?=$consignment->towards1?>">			<br>
				<input type="checkbox" id="windows2" name="windows2" value="1" <? if($consignment->windows2=='1') echo "checked";?>>落地窗
				<input type="checkbox" id="building_facing2" name="building_facing2" value="1" <? if($consignment->building_facing2=='1') echo "checked";?>>本棟大樓
				<input type="checkbox" id="facing_the_household2" name="facing_the_household2" value="1" <? if($consignment->facing_the_household2=='1') echo "checked";?>>該戶大門
				座<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="seat2" name="seat2" value="<?=$consignment->seat2?>">
				朝<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="towards2" name="towards2" value="<?=$consignment->towards2?>">
			</td>	
		</tr>
		<tr height="40">		
			<td >需求戶數</td><td style="width:300px;"><input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="households_demand" name="households_demand" value="<?=$consignment->households_demand?>">&nbsp;&nbsp;&nbsp;&nbsp;推薦樓層&nbsp;&nbsp;&nbsp;<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:180px;" id="recommended_floor" name="recommended_floor" value="<?=$consignment->recommended_floor?>">
			</td>
		</tr>
		<tr height="75">
			<td colspan="5">客戶來源<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="customer_source" name="customer_source[]" value="1" <? if(strstr($consignment->customer_source,'/1/')) echo "checked";?>>西華集團客戶
				<input type="checkbox" id="customer_source" name="customer_source[]" value="2" <? if(strstr($consignment->customer_source,'/2/')) echo "checked";?>>副邦集團客戶
				<input type="checkbox" id="customer_source" name="customer_source[]" value="3" <? if(strstr($consignment->customer_source,'/3/')) echo "checked";?>>住邦經營客戶
				<input type="checkbox" id="customer_source" name="customer_source[]" value="4" <? if(strstr($consignment->customer_source,'/4/')) echo "checked";?>>佳仕得國際客戶
				<input type="checkbox" id="customer_source" name="customer_source[]" value="5" <? if(strstr($consignment->customer_source,'/5/')) echo "checked";?>>同行推薦
				<input type="checkbox" id="customer_source" name="customer_source[]" value="6" <? if(strstr($consignment->customer_source,'/6/')) echo "checked";?>>專業人士<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="customer_source" name="customer_source[]" value="7" <? if(strstr($consignment->customer_source,'/7/')) echo "checked";?>>網絡
				<input type="checkbox" id="customer_source" name="customer_source[]" value="8" <? if(strstr($consignment->customer_source,'/8/')) echo "checked";?>>DM
				<input type="checkbox" id="customer_source" name="customer_source[]" value="9" <? if(strstr($consignment->customer_source,'/9/')) echo "checked";?>>POP
				<input type="checkbox" id="customer_source" name="customer_source[]" value="10" <? if(strstr($consignment->customer_source,'/10/')) echo "checked";?>>路過現場
				<input type="checkbox" id="customer_source" name="customer_source[]" value="11" <? if(strstr($consignment->customer_source,'/11/')) echo "checked";?>>(<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:200px;" id="source_magazine" name="source_magazine" value="<?=$consignment->source_magazine?>">)雜誌
				<input type="checkbox" id="customer_source" name="customer_source[]" value="12" <? if(strstr($consignment->customer_source,'/12/')) echo "checked";?>>其他(<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:300px;" id="source_other" name="source_other" value="<?=$consignment->source_other?>">)
			</td>		
		</tr>
	</tbody></table>
	<br>
	<table width="960" cellspacing="0" cellpadding="0" style="border:2px solid #8EC43B;margin:0 auto;">
		<tbody><tr>
			<td width="30" bgcolor="#8EC43B" align="center"  style="background-color:#8EC43B;color:white;line-height:30px;" rowspan="7"><b>洽談記錄</b></td>
			<td height="30" style="border-right:none;border-bottom:none;">
				<b>第一次洽談</b>
			</td>
			<td width="250" style="border-left:none;border-bottom:none;">
				<input type="checkbox" id="negotiate_mode1" name="negotiate_mode1[]" value="1" <? if(strstr($consignment->negotiate_mode1,'/1/')) echo "checked";?>>來電 &nbsp;
				<input type="checkbox" id="negotiate_mode1" name="negotiate_mode1[]" value="2" <? if(strstr($consignment->negotiate_mode1,'/2/')) echo "checked";?>>來現場 &nbsp;
				<input type="checkbox" id="negotiate_mode1" name="negotiate_mode1[]" value="3" <? if(strstr($consignment->negotiate_mode1,'/3/')) echo "checked";?>>拜訪
			</td>
		</tr>
		<tr height="30">
			<td style="border-top:none;border-bottom:none;" colspan="2">1.詢問及考慮重點 </td>		
		</tr>
		<tr>
			<td style="border-top:none;border-bottom:none;" colspan="2">
				<table width="100%" cellspacing="0" cellpadding="0" border="0">
					<tbody><tr>
						<td width="132">&nbsp;
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="1" <? if(strstr($consignment->key_considerations,'/1/')) echo "checked";?>>地標景觀
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="2" <? if(strstr($consignment->key_considerations,'/2/')) echo "checked";?>>飯店式管理
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="3" <? if(strstr($consignment->key_considerations,'/3/')) echo "checked";?>>西華口碑
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="4" <? if(strstr($consignment->key_considerations,'/4/')) echo "checked";?>>基地超大
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="5" <? if(strstr($consignment->key_considerations,'/5/')) echo "checked";?>>地段考量
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="6" <? if(strstr($consignment->key_considerations,'/6/')) echo "checked";?>>保值投資
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="7" <? if(strstr($consignment->key_considerations,'/7/')) echo "checked";?>>平面規劃
						</td>
					</tr>
					<tr>
						<td width="132">&nbsp;
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="8" <? if(strstr($consignment->key_considerations,'/8/')) echo "checked";?>>超強結構規劃
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="9" <? if(strstr($consignment->key_considerations,'/9/')) echo "checked";?>>風水考量
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="10" <? if(strstr($consignment->key_considerations,'/10/')) echo "checked";?>>國籍會議廳
						</td>
						<td width="132">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="11" <? if(strstr($consignment->key_considerations,'/11/')) echo "checked";?>>公共設施
						</td>
						<td  colspan="3">
							<input type="checkbox" id="key_considerations" name="key_considerations[]" value="12" <? if(strstr($consignment->key_considerations,'/12/')) echo "checked";?>>其他<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:300px;height:30px;" id="key_considerations_other" name="key_considerations_other" value="<?=$consignment->key_considerations_other?>">
						</td>			
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr height="30">					
						<td>2.客戶背景與特性 </td>
					</tr>
					<tr>
						<td width="132" colspan="2">&nbsp;
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="1" <? if(strstr($consignment->background_and_characteristics,'/1/')) echo "checked";?>>大直<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:180px;" id="dazhi" name="dazhi" value="<?=$consignment->dazhi?>">
						</td>
						<td width="132" colspan="2">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="2" <? if(strstr($consignment->background_and_characteristics,'/2/')) echo "checked";?>>內湖科學院區客戶
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="3" <? if(strstr($consignment->background_and_characteristics,'/3/')) echo "checked";?>>台商
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="4" <? if(strstr($consignment->background_and_characteristics,'/4/')) echo "checked";?>>科技業
						</td>
					</tr>
					<tr>
						<td width="132">&nbsp;
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="5" <? if(strstr($consignment->background_and_characteristics,'/5/')) echo "checked";?>>金融服務業
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="6" <? if(strstr($consignment->background_and_characteristics,'/6/')) echo "checked";?>>傳統製造業
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="7" <? if(strstr($consignment->background_and_characteristics,'/7/')) echo "checked";?>>專業人士
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="8" <? if(strstr($consignment->background_and_characteristics,'/8/')) echo "checked";?>>外商
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="9" <? if(strstr($consignment->background_and_characteristics,'/9/')) echo "checked";?>>國際人士
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="10" <? if(strstr($consignment->background_and_characteristics,'/10/')) echo "checked";?>>政府機構
						</td>
					</tr>
					<tr>
						<td width="132" colspan="2">&nbsp;
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="11" <? if(strstr($consignment->background_and_characteristics,'/11/')) echo "checked";?>>需<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="rooms" name="rooms" value="<?=$consignment->rooms?>">房
							(含<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="suite" name="suite" value="<?=$consignment->suite?>">套房)
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="12" <? if(strstr($consignment->background_and_characteristics,'/12/')) echo "checked";?>>需管家房
						</td>
						<td width="132">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="13" <? if(strstr($consignment->background_and_characteristics,'/13/')) echo "checked";?>>三代同堂
						</td>
						<td width="132" colspan="2">
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="14" <? if(strstr($consignment->background_and_characteristics,'/14/')) echo "checked";?>><input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="adult" name="adult" value="<?=$consignment->adult?>">大人
													<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="child" name="child" value="<?=$consignment->child?>">小孩
						</td>					
					</tr>
						<tr><td colspan="7">&nbsp;
							<input type="checkbox" id="background_and_characteristics" name="background_and_characteristics[]" value="15" <? if(strstr($consignment->background_and_characteristics,'/15/')) echo "checked";?>>其他<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:86%;"id="background_and_characteristics_other" name="background_and_characteristics_other" value="<?=$consignment->background_and_characteristics_other?>">
						</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>	
					<tr>
						<td colspan="7">3.對價值與價格的看法 <br>&nbsp;
							您對<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="opinion_floor1" name="opinion_floor1" value="<?=$consignment->opinion_floor1?>">樓能接受的價格，大約在每坪
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="opinion_money1" name="opinion_money1" value="<?=$consignment->opinion_money1?>">~
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="opinion_to_money1" name="opinion_to_money1" value="<?=$consignment->opinion_to_money1?>">萬/坪 <br> &nbsp;
							
							您對<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="opinion_floor2" name="opinion_floor2" value="<?=$consignment->opinion_floor2?>">樓能接受的價格，大約在每坪
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="opinion_money2" name="opinion_money2" value="<?=$consignment->opinion_money2?>">~
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:50px;" id="opinion_to_money2" name="opinion_to_money2" value="<?=$consignment->opinion_to_money2?>">萬/坪  &nbsp;						
						</td>
					</tr>
					<tr>
						<td width="132">&nbsp;
							這次總預算約
						</td>
						<td width="132">
							<input type="checkbox" id="total_budget" name="total_budget[]" value="1" <? if(strstr($consignment->total_budget,'/1/')) echo "checked";?>>2~3億
						</td>
						<td width="132">
							<input type="checkbox" id="total_budget" name="total_budget[]" value="2" <? if(strstr($consignment->total_budget,'/2/')) echo "checked";?>>3~4億
						</td>
						<td width="132">
							<input type="checkbox" id="total_budget" name="total_budget[]" value="3" <? if(strstr($consignment->total_budget,'/3/')) echo "checked";?>>5~6億
						</td>
						<td width="132">
							<input type="checkbox" id="total_budget" name="total_budget[]" value="4" <? if(strstr($consignment->total_budget,'/4/')) echo "checked";?>>6億以上
						</td>
						<td width="132" colspan="2">
							<input type="checkbox" id="total_budget" name="total_budget[]" value="0" <? if(strstr($consignment->total_budget,'/0/')) echo "checked";?>>其他<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:150px;" id="other_total_budget" name="other_total_budget" value="<?=$consignment->other_total_budget?>">
						</td>
					</tr>	
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td colspan="7">4.買或不買的原因 <br> &nbsp;
							<textarea rows="5" style="width:95%;" name="remark" id="remark"><?=$consignment->remark?></textarea>
						</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>		
				</tbody></table>
				<table width="930" cellspacing="0" cellpadding="0" style="border:2px solid #8EC43B;border-right:none;border-left:none;">
					<tbody><tr height="33">				
						<td align="center" rowspan="2"><b>提供資料</b></td>
						<td>
							<input type="checkbox" id="provide_information" name="provide_information[]" value="1" <? if(strstr($consignment->provide_information,'/1/')) echo "checked";?>>簡銷手冊
						</td>
						<td>
							<input type="checkbox" id="provide_information" name="provide_information[]" value="2" <? if(strstr($consignment->provide_information,'/2/')) echo "checked";?>>平面圖
						</td>
						<td>
							<input type="checkbox" id="provide_information" name="provide_information[]" value="3" <? if(strstr($consignment->provide_information,'/3/')) echo "checked";?>>價目表及車位分配表
						</td>
						<td>
							<input type="checkbox" id="provide_information" name="provide_information[]" value="4" <? if(strstr($consignment->provide_information,'/4/')) echo "checked";?>>精裝說明書
						</td>
						<td>
							<input type="checkbox" id="provide_information" name="provide_information[]" value="5" <? if(strstr($consignment->provide_information,'/5/')) echo "checked";?>>斡旋意向書
						</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" id="provide_information" name="provide_information[]" value="6" <? if(strstr($consignment->provide_information,'/6/')) echo "checked";?>>買賣合約書
						</td>
						<td colspan="4">
							<input type="checkbox" id="provide_information" name="provide_information[]" value="7" <? if(strstr($consignment->provide_information,'/7/')) echo "checked";?>>其他<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:150px;" id="provide_information_other" name="provide_information_other" value="<?=$consignment->provide_information_other?>">
						</td>					
					</tr>
				</tbody></table>				
				<table width="930" cellspacing="0" cellpadding="0">
					<tbody><tr height="30" style="border:2px solid #8EC43B;">
						<td style="border:2px solid #8EC43B;border-top:none;border-left:none;border-right:none;">後續追蹤計劃及判斷</td>
						<td style="border:2px solid #8EC43B;border-top:none;border-right:none;" >主管建議</td>
					</tr>
					<tr>
						<td width="465" style="border:2px solid #8EC43B;border-top:none;border-left:none;border-right:none;">
							<textarea rows="6" cols="52" id="tracking_project" name="tracking_project"><?=$consignment->tracking_project?></textarea>
						</td>
						<td width="465" style="border:2px solid #8EC43B;border-right:none;border-top:none;">
							<textarea rows="6" cols="52" id="competent_suggestions" name="competent_suggestions"><?=$consignment->competent_suggestions?></textarea>
						</td>
					</tr>
					<tr height="30">
						<td>主管
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:180px;" id="head" name="head" value="<?=$consignment->head?>">
						</td>
						<td>填表人
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:180px;" id="front_man" name="front_man" value="<?=$consignment->front_man?>">
						</td>
					</tr>
				</tbody></table>
			</td>
		</tr>
	</tbody></table>
	<table width="960" cellspacing="0" cellpadding="0" style="margin:0 auto;">
		<tbody><tr>
			<td width="30"></td>
			<td>
				需求等級
				<input type="checkbox" id="required_level" name="required_level[]" value="1" <? if(strstr($consignment->required_level,'/1/')) echo "checked";?>>4A
				<input type="checkbox" id="required_level" name="required_level[]" value="2" <? if(strstr($consignment->required_level,'/2/')) echo "checked";?>>3A
				<input type="checkbox" id="required_level" name="required_level[]" value="3" <? if(strstr($consignment->required_level,'/3/')) echo "checked";?>>2A
				<input type="checkbox" id="required_level" name="required_level[]" value="4" <? if(strstr($consignment->required_level,'/4/')) echo "checked";?>>A &nbsp;
				編號
				<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:80px;" id="number" name="number" value="<?=$consignment->number?>"> &nbsp;
				日期 &nbsp; 
							<input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:80px;" id="negotiate_year1" name="negotiate_year1" value="<?=$consignment->negotiate_year1?>">年
						    <input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:80px;" id="negotiate_month1" name="negotiate_month1" value="<?=$consignment->negotiate_month1?>">月
						    <input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:80px;" id="negotiate_day1" name="negotiate_day1" value="<?=$consignment->negotiate_day1?>">日
					時間	    <input type="text" style="border-bottom:1px solid #000;BORDER-LEFT: none; BORDER-RIGHT: none; BORDER-TOP: none ;width:80px;" id="negotiate_time1" name="negotiate_time1" value="<?=$consignment->negotiate_time1?>">   		   	 
			</td>
		</tr>
	</tbody>
	</table>
</div>
<div id="tabs-2">
</form>

<form 	method="post" 
		action="<?=site_url('/consignment/discuss_submit')?>" 
		id="discuess_info">


<input type="hidden" id="demand_id" name="demand_id" value="<?=$consignment->demand_id?>">
	<table width="960" cellspacing="0" cellpadding="0" style="border:2px solid #8EC43B;margin:0 auto;">
	  <tbody>
		<tr>
			<td width="30"  bgcolor="#8EC43B" align="center"  style="background-color:#8EC43B;color:white;line-height:30px;" rowspan="3"><b>洽談記錄</b></td>
			<td height="30" style="border-right:none;border-bottom:none;">
				<b>再次洽談</b>
			</td>

			
			<td width="250" style="border-left:none;border-bottom:none;">
				<input type="checkbox" id="call"  name="ch[]"  value="call" <?// if($row->call) echo "checked";  ?>>來電 &nbsp;
				<input type="checkbox" id="there" name="ch[]" value="there" <?// if($row->there) echo "checked"; ?>>來現場 &nbsp;
				<input type="checkbox" id="visit" name="ch[]" value="visit" <?// if($row->visit) echo "checked"; ?>>拜訪
			</td>

				
		</tr>

		<tr height="30">
			<td style="border-top:none;border-bottom:none;">詢問及考慮重點 </td>	
			<td width="400" style="border-left:none;border-bottom:none;">
				日期&nbsp;&nbsp;&nbsp;<?//=$consignment->negotiate_year2?><?=date("Y")?>
				<input type="hidden" id="negotiate_year2" name="negotiate_year2" value="<?=date("Y")?>" >&nbsp;			
				年<input type="text" style="width:60px;height:15px;" id="negotiate_month2" name="negotiate_month2" value="<?//=$consignment->negotiate_month2?>">
				月<input type="text" style="width:60px;height:15px;" id="negotiate_day2" name="negotiate_day2" value="<?//=$consignment->negotiate_day2?>">日&nbsp;&nbsp;
				時間<input type="text" style="width:60px;height:15px;" id="negotiate_time2" name="negotiate_time2" value="<?//=$consignment->negotiate_time2?>">
			</td>
		</tr>



		<tr height="30">
			<td colspan="2">
				<textarea id="negotiate2" name="negotiate2" style="width:95%;" rows="10"><?//=$consignment->negotiate2?></textarea>
			</td>
		</tr>

		<tr height="30">
			

			<td colspan="2">
				<input 	type="button" 
						id="dicsuess" 
						value="儲存洽談" 
						class="input_background"
						style="margin-left:35px;" >
			</td>			
		</tr>

		</tbody>
	</table>

	</form>



	<?php 
	echo "<span id=\"html_form\">";
	$i=1;

	$rnums=$discuss->num_rows();

	 foreach($discuss->result() as $row){  ?>


		<form id="dicsuess_fix_<?=$row->h_consignment_discuss_id?>">		


		<input type="hidden" 
				id="h_consignment_discuss_id" 
				name="h_consignment_discuss_id" 
				value="<?=$row->h_consignment_discuss_id?>">
					
		<table 	width="960" 
				cellspacing="0" 
				cellpadding="0" 
				style="border:2px solid #8EC43B;margin:0 auto;"
				id="dicsuess_fix_<?=$row->h_consignment_discuss_id?>">
		<tbody>

			<tr>

				<td width="30"  bgcolor="#8EC43B" align="center"  style="background-color:#8EC43B;color:white;line-height:30px;" rowspan="3"><b>洽談記錄</b></td>
				<td height="30" style="border-right:none;border-bottom:none;">
					<b>第<?php echo $rnums; $rnums--; ?>次洽談</b>
				</td>

				<td width="250" style="border-left:none;border-bottom:none;">
					<input type="checkbox" id="call"  name="ch[]"  value="call" <? if($row->call) echo "checked";  ?>>來電 &nbsp;
					<input type="checkbox" id="there" name="ch[]" value="there" <? if($row->there) echo "checked"; ?>>來現場 &nbsp;
					<input type="checkbox" id="visit" name="ch[]" value="visit" <? if($row->visit) echo "checked"; ?>>拜訪
				</td>

			</tr>

		<tr height="30">
			<td style="border-top:none;border-bottom:none;">詢問及考慮重點 </td>	
			<td width="400" style="border-left:none;border-bottom:none;">
				日期&nbsp;&nbsp;&nbsp;<?=$row->negotiate_year2?>
				<input type="hidden" id="negotiate_year2" name="negotiate_year2" value="<?=date("Y")?>" value="<?=$consignment->negotiate_year2?>">&nbsp;
				年<input type="text" style="width:60px;height:15px;" id="negotiate_month2" name="negotiate_month2" value="<?=$row->negotiate_month2?>">
				月<input type="text" style="width:60px;height:15px;" id="negotiate_day2" name="negotiate_day2" value="<?=$row->negotiate_day2?>">日&nbsp;&nbsp;
				時間<input type="text" style="width:60px;height:15px;" id="negotiate_time2" name="negotiate_time2" value="<?=$row->negotiate_time2?>">
			</td>
		</tr>



		<tr height="30">
			<td colspan="2">
				<textarea id="negotiate2" name="negotiate2" style="width:95%;" rows="10"><?=$row->negotiate2?></textarea>
			</td>
		</tr>


		<tr height="30">			
			<td colspan="2">
				<input  type="button" 
						id="dicsuess_fix_<?=$row->h_consignment_discuss_id?>" 
						value="修改洽談" 
						class="input_background"
						style="margin-left:35px;">
			</td>			
		</tr>


		</tbody>

	</table>
	</form>
	<?php 

			} 
		echo '</span>';	

	?>
</div>

<script>
	
	$("document").ready(function(){

		$("#dicsuess").click(function(){
			$("form#discuess_info").submit();
		});


		
		$("input[id^='dicsuess_fix_']").each(function(){

			$(this).click(function(){

				var _id = $(this).attr("id");
				


				$.post("/consignment/fixx", { 					
					data: $("form#"+_id).serializeArray() 
				},function(data) {
					//alert(data);
				    alert("修改成功！");

				});
			});

		});

		//class="userinfo">
		$("#main_form_save").click(function(){


			$("form").each(function(){

				if( $(this).attr("id") != "userinfo" ){
					$(this).html("");					
				}
				$("#userinfo").submit();

			});

		});

	});

</script>

<table width="960" cellspacing="0" cellpadding="0" style="text-align:right;margin:0 auto;">
		<tbody>
		<tr>
              <td class="last_save">
	              <input type="hidden" id="demand_id" name="demand_id" value="<?=$consignment->demand_id?>">
	              <input type="button" onclick="return checkform();" value="存檔" class="input_background" id="main_form_save">
	              <input type="reset" value="重置" class="input_background"> 
              </td>
            </tr>
		
	</tbody>
	</table>
</div>

<?=isset($footer) ? $footer : ''?>